#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;

class NumArray {
public:
    NumArray(vector<int>& nums) {
        V = nums;
    }
    
    int sumRange(int i, int j) {
        int sum = 0;
        for(;i<=j;++i){
            sum += V[i];
        }
        return sum;
    }
public:
    vector<int> V;
};

/**
 * Your NumArray object will be instantiated and called as such:
 * NumArray* obj = new NumArray(nums);
 * int param_1 = obj->sumRange(i,j);
 */